package lib

import  (
        zmq "github.com/pebbe/zmq4"
        )


var socket *zmq.Socket


func Connect() {
    socket, _ = zmq.NewSocket(zmq.REQ)
    socket.Connect("ipc:///tmp/sd.ipc")
}


func Disconnect() {
    socket.Close()
}


func GetShortcut(shortcut string) string {
    socket.Send(shortcut, 0)
    println("Sending ", shortcut)

    reply, _ := socket.Recv(0)
    return reply
}
